package com.hl.toolkit.server.tycoin.common.enums;

public enum InjectionStatusEnum {
	WAIT(1, "待注入"), INJECTION(2, "注入中"), INJECTED(3, "已注入"), REINJECTION(4,
			"重新注入中"), INJECTION_FAIL(5, "注入失败"), RECOVERY(6, "回收中"), RECOVERED(
			7, "已回收"), RECOVERY_FAIL(8, "回收失败"), CLOSE(99, "关闭");

	int key;
	String value;

	InjectionStatusEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static InjectionStatusEnum getEnumByKey(int key) {
		for (InjectionStatusEnum objEnum : InjectionStatusEnum.values()) {
			if (key == objEnum.getKey()) {
				return objEnum;
			}
		}
		return null;
	}

}
